<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卖家-修改个人信息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>


 
</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
        
    </div>
    
    <div class="main-right">    	       
        <!-- 查看某订单 -->
        <form method="get" action="<?php echo $this->_url('usershop/shopmyorder');?>" class="margin2">
        	<input type="text" name="payid" class="input1" />
            <input type="submit" value="查看某订单" class="look_order" />
        </form>
        <!-- 查看某订单 end -->
        
        <!-- 订单信息主体内容 -->
        <div class="order_main_wrap">
        	<div class="order_main_head">
            	<ul>
                	<li><a href="<?php echo $this->_url('usershop/shopmyorder/?');?>" class="ordermain_head_a selected1">所有订单</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=1');?>" class="ordermain_head_a">未确定</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=2');?>" class="ordermain_head_a">已确定</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=3');?>" class="ordermain_head_a">未支付</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=4');?>" class="ordermain_head_a">已支付</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=5');?>" class="ordermain_head_a">未发货</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=6');?>" class="ordermain_head_a">已发货</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=7');?>" class="ordermain_head_a">已完成</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=8');?>" class="ordermain_head_a">已收款未发货</a></li>
                    <li><a href="<?php echo $this->_url('usershop/shopmyorder/?state=9');?>" class="ordermain_head_a">未评价</a></li>					
                    <div class="clear"></div>
                </ul>     
                <div class="clear"></div>       
            </div>
            <div class="order_main_body">
                
				<style>
.border_l {
border-left: 1px solid #E0E0E0;
background: none repeat scroll 0 0 #FFFFFF;
}

				</style>
                    <table class="goodslist_table" >


				<tr class="goodslist_tr5"><th colspan="2">商品信息</th>
					<th width="">总计</th>
					<th width="200">订单信息</th>
					<th width="60">状态</th>
					<th width="75">操作</th>
				</tr>					
					
                       <!-- <tr class="goodslist_tr5">
                            <td class="td_first1" width="50">商品图片</td>
                            <td width="80">商品信息</td>
                            <td width="200">订单信息</td>
                            <td width="80">总计</td>
                            <td width="50">状态</td>
                            <td width="60">操作</td>
                            <td width="45"></td>
                        </tr>-->
                        <tr class="sep_row"><td colspan="7"></td></tr>                        
                        <tr class="goodslist_tr2">
                            <td colspan="9">
                            	<div class="tabOps">
                                <label>
				<form action="<?php echo $this->_url('usershop/shopmyorder/?');?>" method="get">
					<select name="state">
						<option value='' <?php if($state=="") {echo 'selected'; }?>>全部</option>
						<option value='1' <?php if($state=="1"){echo "selected";}?>>未确定</option>
						<option value='2' <?php if($state=="2"){echo "selected";}?>>已确定</option>
						<option value='3' <?php if($state=="3"){echo "selected";}?>>未支付</option>
						<option value='4' <?php if($state=="4"){echo "selected";}?>>已支付</option>
						<option value='5' <?php if($state=="5"){echo "selected";}?>>未发货</option>
						<option value='6' <?php if($state=="6"){echo "selected";}?>>已发货</option>
						<option value='7' <?php if($state=="7"){echo "selected";}?>>已完成</option>
						<option value='8' <?php if($state=="8"){echo "selected";}?>>已收款未发货</option>
						<option value='9' <?php if($state=="9"){echo "selected";}?>>未评价</option>
					</select>&nbsp;&nbsp;&nbsp;&nbsp;
					<input class="btn_ser" type="submit" value="查询" />&nbsp;&nbsp;&nbsp;&nbsp;
				</form>								

                                </label>
                                <!--<a href="" class="choose_a1">批量发货</a>
                                <a href="" class="choose_a1">批量备忘</a>
                                <a href="" class="choose_a1">批量免运费</a>
                                <label class="margin1">
                                    <input type="checkbox" class="input2" /><span class="color1">不显示已关闭的订单</span>
                                </label>-->
                                </div>
                                <div class="goto">
                                	<a href="<?php echo $result['page']['prevPage']; ?>" class="back">上一页</a>
                                    <a href="<?php echo $result['page']['nextPage']; ?>" class="pre">下一页</a>
                                </div>
                            </td>
                        </tr>
						
						
						
						
				<?php 
				if(!empty($result['data'])) {
					foreach($result['data'] as $v) {?>
					<?php $num =count($v['order_goods']);foreach($v['order_goods'] as $k=>$val){ ?>
				<tr class="trcolor" style="border-bottom: 1px solid #9DC3E1;">
						<td class=" center" width="82"><a href="<?php echo $this->_url('shop/productshow/'.$val['og']['goods_id']);?>" target="_blank"><img src="<?php echo $val['b']['goods_thumb'];?>" width="80" height="80" onerror="this.src='<?php echo $this->_webroot('/user/images/nopic.gif'); ?>'"/></a></td>
						<td width="280"><a href="<?php echo $this->_url('shop/productshow/'.$val['og']['goods_id']);?>"
						 target="_blank" style="color:#0044DD;"><?php echo  $val['b']['goods_name'];?></a><br/>
						商家：<a href="<?php echo $this->_url('shop/index/'.$val['c']['shop_id']);?>" target="_blank"><?php echo  $val['c']['shop_name'];?></a>  <script src="imshow.php?u=<?php echo  $val['user_id'];?>"></script>
						</td>
						<!-- 合并  -->
	            <?php if($k==0){?>
					<td class="border_l center"  rowspan="<?php echo $num;?>"><?php echo  $v['order_value'];?></td>
					<td class="border_l textleft"  rowspan="<?php echo $num;?>">
						订单号：
						<span title="查看订单详情" style="color:#E38016;"><?php echo  $v['payid'];?></span>
						<?php  if(!empty($v['group_id'])) {?> <a href="goods.php?app=groupbuyinfo&id=<?php echo  $v['group_id'];?>" class="green" target="_blank">[团购]</a>
						<?php }?><br />
						下单时间：<?php echo  substr($v['order_time'],0,16);?><br />
						买家：<?php echo  $v['dname']['u']['username'];?>
					</td>
					<td class="center border_l"  rowspan="<?php echo $num;?>">
						<?php  if($val['b']['lock_flg']==1){
		            		echo "<span class='black'>此商品已被锁定</span><br />";
		            		if($v['order_status']==3) {
								echo "<span class='green'>已完成购买</span><br />";
							}
		            	}else{
							 	if($v['order_status']==0){
									echo "<span class='black'>该订单已删除</span><br />";
								}elseif($v['protect_status']==1){
										echo "<span class='red'>维权中</span><br /> ";
								}elseif($v['protect_status']==2){
										echo "<span class='red'>同意维权</span><br /> ";
								}elseif($v['protect_status']==3){
										echo "<span class='red'>维权结束</span><br /> ";
								}elseif($v['order_status']==3) {
									echo "<span class='green'>已完成购买</span><br />";
								} else {
									if($v['pay_status']==0) {
										echo "<span class='red'>待付款</span><br /> ";
									} elseif($v['pay_status']==2){
										echo "<span class='red'>待退款</span><br /> ";
									} elseif($v['pay_status']==3){
										echo "<span class='red'>已退款</span><br /> ";
									} elseif($v['pay_status']==4){
										echo "<span class='red'>退款成功</span><br /> ";
									}else {
										if($v['transport_status']) {
											echo "<span class='red'>已发货</span><br /> ";
										} else {
											echo "<span class='red'>待发货</span><br />";
										}
									}	
							    }
						}?>
					</td>
					<td class="center border_l"  rowspan="<?php echo $num;?>">
						<?php  if($val['b']['lock_flg']==1){?>
							<a href="<?php echo $this->_url('usershop/shoporderview/?');?>order_id=<?php echo  $v['order_id'];?>" title="查看订单详情">查看详情</a>
						<?php  }else{?>
							<?php  if($v['order_status']==1 && $v['pay_status']==0) {?>
							<a href="<?php echo $this->_url('usershop/shoporderdel/?');?>&id=<?php echo  $v['id'];?>" onclick="return confirm('要确认该订单吗？');">取消订单</a>
							<br />
							<?php }?>
							<?php  if($v['transport_status']==0 && $v['order_status']==1 && $v['pay_status']==1) {?>
								<?php  if($payment_info[$v['pay_id']]['pay_code']=='alipay') {?>
								<a href="<?php echo $this->_url('pay/surerecevi/?type=alipay&filename=comput&');?>order_id=<?php echo  $v['id'];?>" target="_blank">确认发货</a><br />
								<?php  } else {?>
								<a href="<?php echo $this->_url('usershop/shopsurerecevi/?');?>order_id=<?php echo  $v['id'];?>" onclick="javascript:if(confirm('点击确认发货时，请您也要前往您收款所设的支付中介网站进行确认！')){return true;} else {return false;}">确认发货</a><br />
								<?php }?>
							<?php }?>
							<?php  if($v['transport_status']==0 && $v['order_status']==1 && $v['pay_status']==2) {?>
								<a href="<?php echo $this->_url('usershop/shopbackmoney/?');?>&order_id=<?php echo  $v['id'];?>">退款</a><br/>
							<?php }?>
							<?php  if($v['protect_status']==1 || $v['protect_status']==2) {?>
								<a href="<?php echo $this->_url('usershop/shopprotectrights/?');?>order_id=<?php echo  $v['id'];?>"><font color='red'>查看维权</font></a><br/>
							<?php }?>
							<a href="<?php echo $this->_url('usershop/shoporderview/?');?>order_id=<?php echo  $v['id'];?>" title="查看订单详情">
							查看详情</a><br />
							<!-- 订单评价 开始 -->
							<?php  if($v['transport_status']==1 && $v['order_status']==3 && $v['seller_reply']==0) {?>
								<a href="<?php echo $this->_url('usershop/shopcreditadd/?');?>order_id=<?php echo  $v['id'];?>&t=seller" >评价</a><br />
							<?php }else if($v['transport_status']==1 && $v['order_status']==3 && $v['seller_reply']==1){?>
								已评价
							<?php }?>
							<!-- 订单评价 结束 -->
							
						<?php  }?>
					</td>
					<!-- 合并  -->
            <?php }?>
				</tr>
				<?php }?>
				<?php }?>
				<?php  } else {?>
				<tr><td colspan="6" class="center">暂无信息记录</td></tr>
				<?php }?>
                    
                         
                        <tr class="sep_row"><td colspan="7"></td></tr>
                        <tr class="goodslist_tr2">
                            <td colspan="9">
                            	<!--<div class="tabOps">
                                <label>
                                    <input type="checkbox" class="input2" />全选
                                </label>
                                <a href="" class="choose_a1">批量发货</a>
                                <a href="" class="choose_a1">批量备忘</a>
                                <a href="" class="choose_a1">批量免运费</a>
                                <label class="margin1">
                                    <input type="checkbox" class="input2" /><span class="color1">不显示已关闭的订单</span>
                                </label>
                                </div>-->
                                <div class="goto">
                                	<a href="<?php echo $result['page']['prevPage']; ?>" class="back">上一页</a>
                                    <a href="<?php echo $result['page']['nextPage']; ?>" class="pre">下一页</a>								
                                </div>
                            </td>
                        </tr>
                        <tr class="sep_row"><td colspan="9"></td></tr>
						 </form> 
                    </table>
                          
            </div>   
        	<div class="clear"></div>
        </div>
        <!-- 订单信息主体内容 end -->

        <div class="clear"></div>
        
    </div>
    <div class="clear"></div>
</div>


<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>
</body>
</html>